package com.foreveross.fetl.application.impl;

import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.foreveross.fetl.application.IFreightMonitorApplication;
import com.foreveross.fetl.common.application.BaseApplicationImpl;
import com.foreveross.fetl.core.domain.freight.FreightMonitor;
import com.foreveross.fetl.core.domain.freight.repository.IFreightMonitorHbaseRepository;
import com.foreveross.fetl.core.domain.freight.repository.IFreightMonitorRepository;

@Transactional
@Service("freightMonitorApplication")
public class FreightMonitorApplicationImpl extends BaseApplicationImpl
	implements IFreightMonitorApplication{

	@Inject
	private IFreightMonitorRepository freightMonitorRepository;
	@Inject
	private IFreightMonitorHbaseRepository freightMonitorHbaseRepository;
	@Override
	public void create(FreightMonitor f) throws Exception {
		f.create();
	}
	@Override
	public List<com.foreveross.fetl.core.domain.freight.hbase.FreightMonitor> findByRowkey(String start, String end) {
		return freightMonitorHbaseRepository.findByRowkey(start, end);
	}
	@Override
	public List<FreightMonitor>  findByCondition(Object[] objs,String flag) {
		return freightMonitorRepository.findByCondition(objs,flag);
	}
}
